import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
	redirect:"/homepage",
	children:[
		{
			path:"homepage",
			component:()=>import("../views/HomePage.vue")
		},
		{
			path:"projectmananger",
			component:()=>import("../views/ProjectManager.vue"),
			redirect:"/projectmananger/projectlist",
			children:[
				{
					path:"projectlist",
					component:()=>import("../views/ProjectList.vue")
				},
				{
					path:"addproject",
					component:()=>import("../views/AddProject.vue")
				}
			]
		},
		{
			path:"usermanager",
			component:()=>import("../views/UserManager.vue")
		}
		
	]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue')
  }
]

const router = new VueRouter({
  routes,
  linkActiveClass:"link-active"
})

export default router
